3.693 \(\int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^3 \, dx\)

Optimal. Leaf size=84 \[ \frac {a^3 A c^3 \tan ^5(e+f x)}{5 f}+\frac {2 a^3 A c^3 \tan ^3(e+f x)}{3 f}+\frac {a^3 A c^3 \tan (e+f x)}{f}+\frac {a^3 B c^3 \sec ^6(e+f x)}{6 f} \]

[Out]

1/6*a^3*B*c^3*sec(f*x+e)^6/f+a^3*A*c^3*tan(f*x+e)/f+2/3*a^3*A*c^3*tan(f*x+e)^3/f+1/5*a^3*A*c^3*tan(f*x+e)^5/f

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.098, Rules used = {3588, 73, 641, 194} \[ \frac {a^3 A c^3 \tan ^5(e+f x)}{5 f}+\frac {2 a^3 A c^3 \tan ^3(e+f x)}{3 f}+\frac {a^3 A c^3 \tan (e+f x)}{f}+\frac {a^3 B c^3 \sec ^6(e+f x)}{6 f} \]

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Tan[e + f*x])^3*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x])^3,x]

[Out]

(a^3*B*c^3*Sec[e + f*x]^6)/(6*f) + (a^3*A*c^3*Tan[e + f*x])/f + (2*a^3*A*c^3*Tan[e + f*x]^3)/(3*f) + (a^3*A*c^
3*Tan[e + f*x]^5)/(5*f)

Rule 73

Int[((a_) + (b_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[(a*c + b*
d*x^2)^m*(e + f*x)^p, x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && EqQ[b*c + a*d, 0] && EqQ[n, m] && Integer
Q[m]

Rule 194

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[ExpandIntegrand[(a + b*x^n)^p, x], x] /; FreeQ[{a, b}, x]
&& IGtQ[n, 0] && IGtQ[p, 0]

Rule 641

Int[((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(e*(a + c*x^2)^(p + 1))/(2*c*(p + 1)),
x] + Dist[d, Int[(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, p}, x] && NeQ[p, -1]

Rule 3588

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[(a*c)/f, Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^(n - 1)*(A + B*x), x
], x, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0]

Rubi steps

\begin {align*} \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^3 \, dx &=\frac {(a c) \operatorname {Subst}\left (\int (a+i a x)^2 (A+B x) (c-i c x)^2 \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \operatorname {Subst}\left (\int (A+B x) \left (a c+a c x^2\right )^2 \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {a^3 B c^3 \sec ^6(e+f x)}{6 f}+\frac {(a A c) \operatorname {Subst}\left (\int \left (a c+a c x^2\right )^2 \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {a^3 B c^3 \sec ^6(e+f x)}{6 f}+\frac {(a A c) \operatorname {Subst}\left (\int \left (a^2 c^2+2 a^2 c^2 x^2+a^2 c^2 x^4\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {a^3 B c^3 \sec ^6(e+f x)}{6 f}+\frac {a^3 A c^3 \tan (e+f x)}{f}+\frac {2 a^3 A c^3 \tan ^3(e+f x)}{3 f}+\frac {a^3 A c^3 \tan ^5(e+f x)}{5 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.27, size = 65, normalized size = 0.77 \[ \frac {a^3 A c^3 \left (\frac {1}{5} \tan ^5(e+f x)+\frac {2}{3} \tan ^3(e+f x)+\tan (e+f x)\right )}{f}+\frac {a^3 B c^3 \sec ^6(e+f x)}{6 f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Tan[e + f*x])^3*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x])^3,x]

[Out]

(a^3*B*c^3*Sec[e + f*x]^6)/(6*f) + (a^3*A*c^3*(Tan[e + f*x] + (2*Tan[e + f*x]^3)/3 + Tan[e + f*x]^5/5))/f

________________________________________________________________________________________

fricas [C]  time = 0.82, size = 146, normalized size = 1.74 \[ \frac {{\left (160 i \, A + 160 \, B\right )} a^{3} c^{3} e^{\left (6 i \, f x + 6 i \, e\right )} + 240 i \, A a^{3} c^{3} e^{\left (4 i \, f x + 4 i \, e\right )} + 96 i \, A a^{3} c^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + 16 i \, A a^{3} c^{3}}{15 \, {\left (f e^{\left (12 i \, f x + 12 i \, e\right )} + 6 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 15 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 20 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 15 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 6 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^3,x, algorithm="fricas")

[Out]

1/15*((160*I*A + 160*B)*a^3*c^3*e^(6*I*f*x + 6*I*e) + 240*I*A*a^3*c^3*e^(4*I*f*x + 4*I*e) + 96*I*A*a^3*c^3*e^(
2*I*f*x + 2*I*e) + 16*I*A*a^3*c^3)/(f*e^(12*I*f*x + 12*I*e) + 6*f*e^(10*I*f*x + 10*I*e) + 15*f*e^(8*I*f*x + 8*
I*e) + 20*f*e^(6*I*f*x + 6*I*e) + 15*f*e^(4*I*f*x + 4*I*e) + 6*f*e^(2*I*f*x + 2*I*e) + f)

________________________________________________________________________________________

giac [B]  time = 10.17, size = 793, normalized size = 9.44 \[ \frac {5 \, B a^{3} c^{3} \tan \left (f x\right )^{6} \tan \relax (e)^{6} - 30 \, A a^{3} c^{3} \tan \left (f x\right )^{6} \tan \relax (e)^{5} - 30 \, A a^{3} c^{3} \tan \left (f x\right )^{5} \tan \relax (e)^{6} + 15 \, B a^{3} c^{3} \tan \left (f x\right )^{6} \tan \relax (e)^{4} + 15 \, B a^{3} c^{3} \tan \left (f x\right )^{4} \tan \relax (e)^{6} - 20 \, A a^{3} c^{3} \tan \left (f x\right )^{6} \tan \relax (e)^{3} + 90 \, A a^{3} c^{3} \tan \left (f x\right )^{5} \tan \relax (e)^{4} + 90 \, A a^{3} c^{3} \tan \left (f x\right )^{4} \tan \relax (e)^{5} - 20 \, A a^{3} c^{3} \tan \left (f x\right )^{3} \tan \relax (e)^{6} + 15 \, B a^{3} c^{3} \tan \left (f x\right )^{6} \tan \relax (e)^{2} + 45 \, B a^{3} c^{3} \tan \left (f x\right )^{4} \tan \relax (e)^{4} + 15 \, B a^{3} c^{3} \tan \left (f x\right )^{2} \tan \relax (e)^{6} - 6 \, A a^{3} c^{3} \tan \left (f x\right )^{6} \tan \relax (e) + 30 \, A a^{3} c^{3} \tan \left (f x\right )^{5} \tan \relax (e)^{2} - 180 \, A a^{3} c^{3} \tan \left (f x\right )^{4} \tan \relax (e)^{3} - 180 \, A a^{3} c^{3} \tan \left (f x\right )^{3} \tan \relax (e)^{4} + 30 \, A a^{3} c^{3} \tan \left (f x\right )^{2} \tan \relax (e)^{5} - 6 \, A a^{3} c^{3} \tan \left (f x\right ) \tan \relax (e)^{6} + 5 \, B a^{3} c^{3} \tan \left (f x\right )^{6} + 45 \, B a^{3} c^{3} \tan \left (f x\right )^{4} \tan \relax (e)^{2} + 45 \, B a^{3} c^{3} \tan \left (f x\right )^{2} \tan \relax (e)^{4} + 5 \, B a^{3} c^{3} \tan \relax (e)^{6} + 6 \, A a^{3} c^{3} \tan \left (f x\right )^{5} - 30 \, A a^{3} c^{3} \tan \left (f x\right )^{4} \tan \relax (e) + 180 \, A a^{3} c^{3} \tan \left (f x\right )^{3} \tan \relax (e)^{2} + 180 \, A a^{3} c^{3} \tan \left (f x\right )^{2} \tan \relax (e)^{3} - 30 \, A a^{3} c^{3} \tan \left (f x\right ) \tan \relax (e)^{4} + 6 \, A a^{3} c^{3} \tan \relax (e)^{5} + 15 \, B a^{3} c^{3} \tan \left (f x\right )^{4} + 45 \, B a^{3} c^{3} \tan \left (f x\right )^{2} \tan \relax (e)^{2} + 15 \, B a^{3} c^{3} \tan \relax (e)^{4} + 20 \, A a^{3} c^{3} \tan \left (f x\right )^{3} - 90 \, A a^{3} c^{3} \tan \left (f x\right )^{2} \tan \relax (e) - 90 \, A a^{3} c^{3} \tan \left (f x\right ) \tan \relax (e)^{2} + 20 \, A a^{3} c^{3} \tan \relax (e)^{3} + 15 \, B a^{3} c^{3} \tan \left (f x\right )^{2} + 15 \, B a^{3} c^{3} \tan \relax (e)^{2} + 30 \, A a^{3} c^{3} \tan \left (f x\right ) + 30 \, A a^{3} c^{3} \tan \relax (e) + 5 \, B a^{3} c^{3}}{30 \, {\left (f \tan \left (f x\right )^{6} \tan \relax (e)^{6} - 6 \, f \tan \left (f x\right )^{5} \tan \relax (e)^{5} + 15 \, f \tan \left (f x\right )^{4} \tan \relax (e)^{4} - 20 \, f \tan \left (f x\right )^{3} \tan \relax (e)^{3} + 15 \, f \tan \left (f x\right )^{2} \tan \relax (e)^{2} - 6 \, f \tan \left (f x\right ) \tan \relax (e) + f\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^3,x, algorithm="giac")

[Out]

1/30*(5*B*a^3*c^3*tan(f*x)^6*tan(e)^6 - 30*A*a^3*c^3*tan(f*x)^6*tan(e)^5 - 30*A*a^3*c^3*tan(f*x)^5*tan(e)^6 +
15*B*a^3*c^3*tan(f*x)^6*tan(e)^4 + 15*B*a^3*c^3*tan(f*x)^4*tan(e)^6 - 20*A*a^3*c^3*tan(f*x)^6*tan(e)^3 + 90*A*
a^3*c^3*tan(f*x)^5*tan(e)^4 + 90*A*a^3*c^3*tan(f*x)^4*tan(e)^5 - 20*A*a^3*c^3*tan(f*x)^3*tan(e)^6 + 15*B*a^3*c
^3*tan(f*x)^6*tan(e)^2 + 45*B*a^3*c^3*tan(f*x)^4*tan(e)^4 + 15*B*a^3*c^3*tan(f*x)^2*tan(e)^6 - 6*A*a^3*c^3*tan
(f*x)^6*tan(e) + 30*A*a^3*c^3*tan(f*x)^5*tan(e)^2 - 180*A*a^3*c^3*tan(f*x)^4*tan(e)^3 - 180*A*a^3*c^3*tan(f*x)
^3*tan(e)^4 + 30*A*a^3*c^3*tan(f*x)^2*tan(e)^5 - 6*A*a^3*c^3*tan(f*x)*tan(e)^6 + 5*B*a^3*c^3*tan(f*x)^6 + 45*B
*a^3*c^3*tan(f*x)^4*tan(e)^2 + 45*B*a^3*c^3*tan(f*x)^2*tan(e)^4 + 5*B*a^3*c^3*tan(e)^6 + 6*A*a^3*c^3*tan(f*x)^
5 - 30*A*a^3*c^3*tan(f*x)^4*tan(e) + 180*A*a^3*c^3*tan(f*x)^3*tan(e)^2 + 180*A*a^3*c^3*tan(f*x)^2*tan(e)^3 - 3
0*A*a^3*c^3*tan(f*x)*tan(e)^4 + 6*A*a^3*c^3*tan(e)^5 + 15*B*a^3*c^3*tan(f*x)^4 + 45*B*a^3*c^3*tan(f*x)^2*tan(e
)^2 + 15*B*a^3*c^3*tan(e)^4 + 20*A*a^3*c^3*tan(f*x)^3 - 90*A*a^3*c^3*tan(f*x)^2*tan(e) - 90*A*a^3*c^3*tan(f*x)
*tan(e)^2 + 20*A*a^3*c^3*tan(e)^3 + 15*B*a^3*c^3*tan(f*x)^2 + 15*B*a^3*c^3*tan(e)^2 + 30*A*a^3*c^3*tan(f*x) +
30*A*a^3*c^3*tan(e) + 5*B*a^3*c^3)/(f*tan(f*x)^6*tan(e)^6 - 6*f*tan(f*x)^5*tan(e)^5 + 15*f*tan(f*x)^4*tan(e)^4
 - 20*f*tan(f*x)^3*tan(e)^3 + 15*f*tan(f*x)^2*tan(e)^2 - 6*f*tan(f*x)*tan(e) + f)

________________________________________________________________________________________

maple [A]  time = 0.02, size = 75, normalized size = 0.89 \[ \frac {a^{3} c^{3} \left (\frac {B \left (\tan ^{6}\left (f x +e \right )\right )}{6}+\frac {A \left (\tan ^{5}\left (f x +e \right )\right )}{5}+\frac {B \left (\tan ^{4}\left (f x +e \right )\right )}{2}+\frac {2 A \left (\tan ^{3}\left (f x +e \right )\right )}{3}+\frac {B \left (\tan ^{2}\left (f x +e \right )\right )}{2}+A \tan \left (f x +e \right )\right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^3,x)

[Out]

1/f*a^3*c^3*(1/6*B*tan(f*x+e)^6+1/5*A*tan(f*x+e)^5+1/2*B*tan(f*x+e)^4+2/3*A*tan(f*x+e)^3+1/2*B*tan(f*x+e)^2+A*
tan(f*x+e))

________________________________________________________________________________________

maxima [A]  time = 0.83, size = 106, normalized size = 1.26 \[ \frac {5 \, B a^{3} c^{3} \tan \left (f x + e\right )^{6} + 6 \, A a^{3} c^{3} \tan \left (f x + e\right )^{5} + 15 \, B a^{3} c^{3} \tan \left (f x + e\right )^{4} + 20 \, A a^{3} c^{3} \tan \left (f x + e\right )^{3} + 15 \, B a^{3} c^{3} \tan \left (f x + e\right )^{2} + 30 \, A a^{3} c^{3} \tan \left (f x + e\right )}{30 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^3,x, algorithm="maxima")

[Out]

1/30*(5*B*a^3*c^3*tan(f*x + e)^6 + 6*A*a^3*c^3*tan(f*x + e)^5 + 15*B*a^3*c^3*tan(f*x + e)^4 + 20*A*a^3*c^3*tan
(f*x + e)^3 + 15*B*a^3*c^3*tan(f*x + e)^2 + 30*A*a^3*c^3*tan(f*x + e))/f

________________________________________________________________________________________

mupad [B]  time = 8.46, size = 120, normalized size = 1.43 \[ \frac {a^3\,c^3\,\sin \left (e+f\,x\right )\,\left (30\,A\,{\cos \left (e+f\,x\right )}^5+15\,B\,{\cos \left (e+f\,x\right )}^4\,\sin \left (e+f\,x\right )+20\,A\,{\cos \left (e+f\,x\right )}^3\,{\sin \left (e+f\,x\right )}^2+15\,B\,{\cos \left (e+f\,x\right )}^2\,{\sin \left (e+f\,x\right )}^3+6\,A\,\cos \left (e+f\,x\right )\,{\sin \left (e+f\,x\right )}^4+5\,B\,{\sin \left (e+f\,x\right )}^5\right )}{30\,f\,{\cos \left (e+f\,x\right )}^6} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*tan(e + f*x))*(a + a*tan(e + f*x)*1i)^3*(c - c*tan(e + f*x)*1i)^3,x)

[Out]

(a^3*c^3*sin(e + f*x)*(30*A*cos(e + f*x)^5 + 5*B*sin(e + f*x)^5 + 20*A*cos(e + f*x)^3*sin(e + f*x)^2 + 15*B*co
s(e + f*x)^2*sin(e + f*x)^3 + 6*A*cos(e + f*x)*sin(e + f*x)^4 + 15*B*cos(e + f*x)^4*sin(e + f*x)))/(30*f*cos(e
 + f*x)^6)

________________________________________________________________________________________

sympy [C]  time = 1.01, size = 231, normalized size = 2.75 \[ \frac {- 240 A a^{3} c^{3} e^{4 i e} e^{4 i f x} - 96 A a^{3} c^{3} e^{2 i e} e^{2 i f x} - 16 A a^{3} c^{3} + \left (- 160 A a^{3} c^{3} e^{6 i e} + 160 i B a^{3} c^{3} e^{6 i e}\right ) e^{6 i f x}}{15 i f e^{12 i e} e^{12 i f x} + 90 i f e^{10 i e} e^{10 i f x} + 225 i f e^{8 i e} e^{8 i f x} + 300 i f e^{6 i e} e^{6 i f x} + 225 i f e^{4 i e} e^{4 i f x} + 90 i f e^{2 i e} e^{2 i f x} + 15 i f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))**3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))**3,x)

[Out]

(-240*A*a**3*c**3*exp(4*I*e)*exp(4*I*f*x) - 96*A*a**3*c**3*exp(2*I*e)*exp(2*I*f*x) - 16*A*a**3*c**3 + (-160*A*
a**3*c**3*exp(6*I*e) + 160*I*B*a**3*c**3*exp(6*I*e))*exp(6*I*f*x))/(15*I*f*exp(12*I*e)*exp(12*I*f*x) + 90*I*f*
exp(10*I*e)*exp(10*I*f*x) + 225*I*f*exp(8*I*e)*exp(8*I*f*x) + 300*I*f*exp(6*I*e)*exp(6*I*f*x) + 225*I*f*exp(4*
I*e)*exp(4*I*f*x) + 90*I*f*exp(2*I*e)*exp(2*I*f*x) + 15*I*f)

________________________________________________________________________________________